<template>
	<view class="parsePage">
		<u-parse :html="content" :tag-style="style"></u-parse>
	</view>
</template>

<script>
	var util = require('../../common/util.js');
	export default {
		data() {
			return {
				content: '',
				style: {
					img: 'width: 100% !important; display: block; vertical-align: middle; margin: 8rpx 0; pointer-events:none;'
				},
			}
		},
		onLoad (options) {
			let title = ''
			switch (options.type){
				case 'hezuo':
					title = '商务合作'
					break;
				case 'guize':
					title = '交易规则'
					break;
				case 'wenti':
					title = '常见问题'
					break;
				case 'about':
					title = '关于'
					break;
				default:
					break;
			}
			uni.setNavigationBarTitle({
				title
			})
			this.loadData();
		},
		methods: {
			loadData: function(){
				// 加载数据
				var that = this;
				util.requestPost("api.php/user/aboutUs", {}, function(res) {
					that.content = res.data.about_us;
				});
			},
		}
	}
</script>

<style scoped>
.parsePage {
	padding: 32rpx;
}
</style>
